<?php require_once('menu.php'); ?>
<script type="text/javascript">
$().ready(function() {
    $("#businessForm").validate({
        errorLabelContainer: $("#businessForm div.error")
    });
});
</script>

<table width="100%" class="menubar" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td class="menudottedline" width="40%">
        <?php
         if (isset($alert)) {
         ?>
            <div class="pathway">Alert:&nbsp;<?=$alert?></div>
        <?php
         }
         ?>
        </td>
        <td class="menudottedline" align="right">
            <table cellpadding="0" cellspacing="0" border="0" id="toolbar">
                <tr height="60" valign="middle" align="center">
                    <td>
                        <a class="toolbar" href="#">
                        <?php echo $html->image('admin/help_f2.png', array('align' => 'middle', 'border' => 0)); ?><br>Help
                        </a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<br>
<br>
<div align="center" class="centermain">
    <div class="main">
        <table class="adminheading">
            <tr>
                <th class="info" rowspan="2" nowrap>Add Custom Fields</th>
            </tr>
        </table>


        <table class="adminform">
            <tr>
                <td width="60%" valign="top">
                    <form id="businessForm" name="businessForm" method="post" action="<?=$html->url('/admin/add_custom_field')?>" enctype="multipart/form-data">
                    <div class="error"></div>
                    <table class="adminlist" cellpadding=20>
                    	<tr>
                    		<th>Custom Field Details</th>
                    	</tr>
                    	<tr>
                    		<td align="left"></td>
                    	</tr>
                    </table>

                    <table class="adminlist" cellpadding=20>
                        <tr>
                            <td align="left" width="20%"><font color="red"><b>*</b></font>&nbsp;Field name</td>
                            <td align="left" style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="text" name="data[field][field_name]" id="field_name" style="width: 400px" title="Please enter field name<br/>" class="{required:true}">
                            </td>
						</tr>
                        <tr>
                            <td align="left"><font color="red"><b>*</b></font>&nbsp;Data Type</td>
                            <td align="left" style="border: 1px dotted #ccc; background-color: #efefef;">
                                <?php echo $form->select('field_type', $data_type, null, array('id' => 'field_type', 'style' => 'width: 90px; height: 20px;', 'title' => 'Please enter field name data type<br/>', 'class' => '{required:true}', 'onchange' => '')); ?>
                            </td>
						</tr>
                        <tr>
                            <td align="left">&nbsp;Field Length</td>
                            <td align="left" style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="text" name="data[field][field_length]" id="field_length" style="width: 85px">
                            </td>
						</tr>
                         <tr>
                            <td colspan="2">&nbsp;</td>
                         </tr>
                         <tr>
                            <td>&nbsp;</td>
                            <td align="left"><input type="submit" value="Save" style="width: 150px;" class="button"></td>
                         </tr>
                    </table>

                </td>
            </tr>
        </table>


    </div>
</div>